<template>
  <div :class="{'background': !hideBackground}">
    <router-view />
  </div>
</template>

<script>
export default {
  data() {
    return {
      hideBackground: false
    }
  },
  watch: {
    $route(to) {
      this.hideBackground = to.meta.hideBackground || false;
    }
  }
}
</script>

<style lang="stylus">
// 修复背景显示问题
html, body
  margin: 0
  padding: 0
  //height: 100%
  width: 100%

  .background
    min-height: 100vh
    display: flex
    align-items: center
    justify-content: center
    background: url('./assets/login-bg.jpg') no-repeat center center fixed
    background-size: cover
    position: relative
    width: 100%
  //height: 100%



</style>
